﻿using System;
using Microsoft.Extensions.Primitives;

namespace KelonProud.Mvc.ViewEngine
{
    public class KelonProudVirtualPathChangeToken : IChangeToken
    {
        private readonly string _virtualPath;

        public KelonProudVirtualPathChangeToken(string virtualPath)
        {
            this._virtualPath = virtualPath;
        }

        public IDisposable RegisterChangeCallback(Action<object> callback, object state) => EmptyDisposable.Instance;

        public bool HasChanged => false;
        public bool ActiveChangeCallbacks => false;

        internal class EmptyDisposable : IDisposable
        {
            public static EmptyDisposable Instance { get; } = new EmptyDisposable();
            private EmptyDisposable() { }
            public void Dispose() { }
        }
    }
}
